<template>
  <div class="container">
    <!-- 列表 -->
    <el-table :data="tableData" border style="width: 100%">
      <el-table-column fixed prop="orderNo" label="序号" width="150"> </el-table-column>
      <el-table-column prop="bankName" label="银行名称" width="180"> </el-table-column>
      <el-table-column prop="province" label="银行图片" width="120">
        <template slot-scope="scope">
          <el-image style="width: 100px; height: 100px" :src="scope.row.bankLogo" />
        </template>
      </el-table-column>

      <el-table-column fixed="right" label="操作" width="100">
        <template slot-scope="scope">
          <el-button @click="handleClick(scope.row)" type="text" size="small">查看</el-button>
          <el-button type="text" size="small">编辑</el-button>
        </template>
      </el-table-column>
    </el-table>

    <!-- 分页 -->
    <el-pagination
      @size-change="handleSizeChange"
      @current-change="handleCurrentChange"
      :current-page="1"
      :page-sizes="[100, 200, 300, 400]"
      :page-size="100"
      layout="total, sizes, prev, pager, next, jumper"
      :total="total"
    />
  </div>
</template>

<script>
import { getBankList } from '../../api/bankList'
export default {
  data() {
    return {
      tableData: [],

      total: 0
    }
  },
  created() {
    this.handleLoad()
  },

  methods: {
    async handleLoad() {
      const { data, count } = await getBankList({
        pageSize: 10,
        pageNo: 1
      })
      console.log(data)
      this.tableData = data
      this.total = count
    },

    handleSizeChange() {},
    handleCurrentChange() {}
  }
}
</script>

<style lang="less" scoped></style>
